<?php

class FilesModel extends Model
{
    public function saveFile($location,$mime,$size)
    {
        $arr = array(
            'location' => $location,
            'mime' => $mime,
            'size' => $size
        );
        $this->loadTable('files',$arr);
        $this->tables['files']->insert();
        return $this->tables['files']->inserted_id();
    }
}

?>
